﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;

namespace JenkinsCodeBuid.Service
{
    public class FileHelper
    {
        /// <summary>
        /// 获取文件名称
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public async static Task<List<string>> GetFileNames(string path)
        {
           return await Task.Run(() => {
                var files = Directory.GetDirectories(path);
                var result = files.Select(x => x.Replace(path, "")).ToList();
                return result;
            });

        }
    }
}
